﻿
namespace ProblemsSet
{
    public class Problem_4: BaseProblem
    {
        public override object GetResult()
        {
            long cur = 1;
            for (int i=100; i <= 999; i++)
            {
                for (int j = 100; j <= 999; j++)
                {
                    long val = i*j;
                    if (MathLogic.IsPolindrom(val) && cur < val) cur = val;
                }
            }
            return cur;
        }

        public override string Problem
        {
            get
            {
                return @"A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91  99.

Find the largest palindrome made from the product of two 3-digit numbers.";
            }
        }

        public override bool IsSolved
        {
            get
            {
                return true;
            }
        }

        public override object Answer
        {
            get
            {
                return 906609;
            }
        }

    }
}
